import java.io.*;
import java.lang.*;
public class Display
{         
         
   private InputStreamReader ir=new InputStreamReader(System.in);
	private BufferedReader br,br1;
	private FileOutputStream fos;
	private	PrintStream ps; 
	private FileReader frs; 
      
        String id[]=new String[20];
        int stock[]=new int[20];
        double price[]=new double[20];
        int rol[]=new int[20];
        String name[]=new String[20],s;  
        String cline[]=new String[10];
        String sname[]=new String[20];
         public void aviInventory()
             {
                       
                                int id1[]= new int[20],i=0,total=0;
                                try
                             {
                                frs=new FileReader("InventoryItem.txt");
                                 
                                br=new BufferedReader(frs);
                               while((s=br.readLine()) != null)
			      {
                                  total=total+1;
				cline=s.split(",");
                                System.out.println("raj");
                                id[i]=cline[0];
                                name[i]=cline[1];
                                sname[i]=cline[2];
                                stock[i]=Integer.parseInt(cline[4]);
                                rol[i]=Integer.parseInt(cline[5]);
                                price[i]=Double.parseDouble(cline[3]);
                                                                i++;
			       }

                                System.out.println("Raw Materials In Inventory Are:");
                                     System.out.println("---------------------------------------------------------------");
                                     System.out.println("\n  ID      NAME        SNAME    PRICE           STOCK           ROL       ");		             	     System.out.println("-----------------------------------------------------------------");
                                     for(int n=0;n<i;n++)
                                      {
                                          System.out.println(id[n]+"     "+name[n]+"          "+sname[n]+"          "+price[n]+"             "+stock[n]+"          "+rol[n]);
                                       }
                                                   
		}
		catch(Exception ex)
		{
			System.out.println("Some exceptions occured...");
			System.out.println("Could not generate the daily transaction report...!");	
		}
		
              }
          public void manfProductlist()
             {       int i=0;String rol1[]=new String[20];
                   try
                             {
                                   frs=new FileReader("Item.txt");
                                 
                                br=new BufferedReader(frs);
                               while((s=br.readLine()) != null)
			      {
                                  cline=s.split(",");
                                System.out.println("raj");
                                id[i]=cline[0];
                                name[i]=cline[1];
                                sname[i]=cline[2];
                                stock[i]=Integer.parseInt(cline[5]);
                                rol1[i]=cline[3];
                                price[i]=Double.parseDouble(cline[4]);
                                                                i++;
			       }

                                System.out.println("Product Avilable At Manufacturer Are:");
                                     System.out.println("---------------------------------------------------------------");
                                     System.out.println("\n  ID            NAME           Des          RMREQ         Price                Stock       ");
		             	     System.out.println("-----------------------------------------------------------------");
                                     for(int n=0;n<i;n++)
                                      {
                                          System.out.println(id[n]+"   "+name[n]+"      "+sname[n]+"      "+rol1[n]+"        "+price[n]+"         "+stock[n]);
                                       }
                                                   
		}
		catch(Exception ex)
		{
			System.out.println("Some exceptions occured...");
			System.out.println("Could not generate the daily transaction report...!");	
		}
		

                                     

              }

}